package com.yuexunit.finance.bulkstock.action.v1;

import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockCollection;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockCollectionDetail;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockCollectionMaterial;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockGather;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockGatherDetail;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockLatestCollection;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockLatestGather;
import com.yuexunit.finance.bulkstock.action.v1.model.BulkstockWarningLineInfo;
import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/**
 * Created by HuangYH on 2015/10/12.
 */
public interface BulkstockCollectionActionApi {

	@Permission
    @Action(version = FinVersion1.class, description = "新增大宗商品价格采集附件")
    @Parameter(name = "collectionMaterialId", description = "大宗类别ID")
	public String createCollectionMaterial(
    		@Parameter(name = "fileUuid", description = "上传附件文档") String fileUuid,
    		@Parameter(name = "dataSourceId", description = "数据来源ID") Long dataSourceId
    );

	@Permission
    @Action(version=FinVersion1.class,description="删除大宗商品价格采集附件")
	public void disableCollectionMaterial(
    		@Parameter(name = "bulkstockCollectionMaterialId", description = "大宗商品采集附件ID") Long bulkstockCollectionMaterialId
    );

	@Permission
    @Action(version = FinVersion1.class, description = "大宗商品价格采集附件")
	public PageList<BulkstockCollectionMaterial> inquireCollectionMaterialPageList(
    		@Parameter(name = "startDate", description = "采集开始时间", nullable = true) String startDate,
			@Parameter(name = "endDate", description = "采集结束时间", nullable = true) String endDate, 
			@Parameter(name = "region", description = "所属片区", nullable = true) String region,
			@Parameter(name = "collector", description = "采集人", nullable = true) String collector, 
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
    //================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "新增大宗商品价格采集")
	@Parameter(name = "collectionId", description = "商品价格收集ID")
	public String createBulkstockCollection(BulkstockCollection bulkstockCollection);

	@Permission
	@Action(version = FinVersion1.class, description = "更新大宗商品价格采集")
	public void updateBulkstockCollection(BulkstockCollectionDetail bulkstockCollectionDetail);

	@Permission
	@Action(version = FinVersion1.class, description = "删除大宗商品价格采集")
	public void disableBulkstockCollection(
			@Parameter(name = "collectionId", description = "商品价格收集ID") Long collectionId
	);

    @Action(version = FinVersion1.class, description = "大宗商品价格采集明细")
	public BulkstockCollectionDetail inquireBulkstockCollectionDetail(
    		@Parameter(name = "collectionId", description = "商品价格收集ID") Long collectionId
    );
    
    @Action(version = FinVersion1.class, description = "大宗商品价格采集列表")
	public PageList<BulkstockCollection> inquireBulkstockCollectionPageList(
			@Parameter(name = "categoryId", description = "大宗类别ID", nullable = true) Long categoryId,
            @Parameter(name = "startDate", description = "开始时间", nullable = true) String startDate,
            @Parameter(name = "endDate", description = "结束时间", nullable = true) String endDate,
            @Parameter(name = "bulkstockName", description = "商品名称", nullable = true) String bulkstockName,
            @Parameter(name = "bulkstockType", description = "商品类别", nullable = true) String bulkstockType,
            @Parameter(name = "specification", description = "规格型号", nullable = true) String specification,
            @Parameter(name = "manufacturer", description = "生产厂家", nullable = true) String manufacturer,
            @Parameter(name = "region", description = "所属片区", nullable = true) String region,
            @Parameter(name = "page", description = "分页参数") PageCriteria page
    );
    
	@Action(version = FinVersion1.class, description = "最新商品采集价格列表")
	public PageList<BulkstockLatestCollection> inquireBulkstockLatestCollectionList(
			@Parameter(name = "bulkstockCategoryId", description = "大宗商品类别", nullable = true) Long bulkstockCategoryId,
			@Parameter(name = "bulkstockInfoId", description = "大宗商品ID", nullable = true) Long bulkstockInfoId,
			@Parameter(name = "bulkstockName", description = "大宗商品名称", nullable = true) String bulkstockName,
			@Parameter(name = "specification", description = "规格型号 ", nullable = true) String specification,
			@Parameter(name = "region", description = "所属片区", nullable = true) String region,
			@Parameter(name = "dataSourceId", description = "数据来源ID", nullable = true) Long dataSourceId,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	// ================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "导入商品价格汇总Excel")
	public void importBulkstockGather(
			@Parameter(name = "fileUuid", description = "商品价格汇总Excel") String fileUuid
	);

	@Permission
	@Action(version = FinVersion1.class, description = "新建商品价格汇总")
	@Parameter(name = "gatherId", description = "商品浮动ID")
	public String createBulkstockGather(BulkstockGather bulkstockGather);

	@Permission
	@Action(version = FinVersion1.class, description = "更新商品价格汇总")
	public void updateBulkstockGather(BulkstockGatherDetail bulkstockGatherDetail);

	@Permission
	@Action(version = FinVersion1.class, description = "删除商品价格汇总")
	public void disableBulkstockGather(
			@Parameter(name = "gatherId", description = "商品浮动ID") Long gatherId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "商品价格汇总明细")
	public void issueBulkstockGather(
			@Parameter(name = "gatherId", description = "商品浮动ID") Long gatherId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "商品价格汇总明细")
	public BulkstockGatherDetail inquireBulkstockGatherDetail(
			@Parameter(name = "gatherId", description = "商品浮动ID") Long gatherId
	);
	
	@Action(version = FinVersion1.class, description = "商品价格汇总列表")
    public PageList<BulkstockGatherDetail> inquireBulkstockGatherList(
            @Parameter(name = "categoryId", description = "大宗类别ID", nullable = true) Long categoryId,
            @Parameter(name = "bulkstockInfoId", description = "大宗商品ID", nullable = true) Long bulkstockInfoId,
            @Parameter(name = "bulkstockName", description = "大宗商品名称", nullable = true) String bulkstockName,
            @Parameter(name = "specification", description = "规格型号", nullable = true) String specification,
            @Parameter(name = "startTime", description = "发布开始日期", nullable = true) String startTime,
            @Parameter(name = "endTime", description = "发布结束日期", nullable = true) String endTime,
            @Parameter(name = "startPriceDate", description = "价格开始日期", nullable = true) String startPriceDate,
            @Parameter(name = "endPriceDate", description = "价格结束日期", nullable = true) String endPriceDate,
            @Parameter(name = "auditState", description = "是否审核 0:未审核/1:已审核", nullable = true) Integer auditState,
            @Parameter(name = "page", description = "分页参数") PageCriteria page
    );
	
	@Action(version = FinVersion1.class, description = "最新商品汇总价格列表")
	public PageList<BulkstockLatestGather> inquireBulkstockGatherLatestList(
			@Parameter(name = "bulkstockCategoryId", description = "大宗商品类别", nullable = true) Long bulkstockCategoryId,
			@Parameter(name = "bulkstockInfoId", description = "大宗商品ID", nullable = true) Long bulkstockInfoId,
			@Parameter(name = "bulkstockName", description = "大宗商品名称", nullable = true) String bulkstockName,
			@Parameter(name = "specification", description = "规格型号 ", nullable = true) String specification,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	@Action(version = FinVersion1.class, description = "最新商品采集总价列表")
	public BulkstockLatestGather inquireBulkstockLatestGather(
			@Parameter(name = "bulkstockInfoId", description = "大宗商品ID", nullable = true) Long bulkstockInfoId
	);
	
	// ================================================================================================================//
	
	@Permission
	@Action(version = FinVersion1.class, description = "价格预警列表")
	public PageList<BulkstockWarningLineInfo> inquireBulkstockWarningPageList(
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
}
